package com.eagle.common.core.support;

import com.eagle.common.core.base.Auditable;
import com.eagle.common.core.base.Versionable;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @param <ID> id类型
 * @author : wcy
 * Date: 2017/9/7
 * Time: 10:25
 */
public abstract class AbstractEntity<ID extends Serializable> implements Auditable<String, ID>, Versionable {

    private Long version;
    private LocalDateTime gmtCreate;
    private String createBy;
    private String modifiedBy;
    private LocalDateTime gmtModified;

    @Override
    public Long getVersion() {
        return version;
    }

    @Override
    public void setVersion(Long version) {
        this.version = version;
    }

    @Override
    public String getModifiedBy() {
        return modifiedBy;
    }

    @Override
    public void setModifiedBy(String modifiedBy) {
        this.modifiedBy = modifiedBy;
    }

    @Override
    public ID getId() {
        return null;
    }

    @Override
    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    @Override
    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @Override
    public String getCreateBy() {
        return createBy;
    }

    @Override
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    @Override
    public LocalDateTime getGmtModified() {
        return gmtModified;
    }

    @Override
    public void setGmtModified(LocalDateTime gmtModified) {
        this.gmtModified = gmtModified;
    }
}
